function createMap(res) {
  res = JSON.parse(res);
  res.features.forEach((province) => {
    // 省市的物体
    let provinceObj = new THREE.Object3D();
    if (province.geometry.type === "Polygon") {
      province.geometry.coordinates.forEach((polygon) => {
        let shape = new THREE.Shape();
        let arr = [];
        for (let i = 0; i < polygon.length; i++) {
          let (x, y) = projection(polygon[i]);
          if (i === 0) {
            shape.moveTo(x, -y);
          } else {
            shape.lineTo(x, -y);
          }
          arr.push(x, -y, 1);
        }
        let mesh = createPolygon(shape, arr, province); 
        provinceObj.add(mesh); 
      });
    } else if (province.geometry.type === "MultiPolygon") {
      province.geometry.coordinates.forEach((multipolygon) => {
        multipolygon.forEach((polygon) => {
          let shape = new THREE.Shape();
          let arr = [];
          for (let i = 0; i < polygon.length; i++) {
            let (x, y) = projection(polygon[i]);
            if (i === 0) {
              shape.moveTo(x, -y);
            } else {
              shape.lineTo(x, -y);
            }
            arr.push(x, -y, 1);
          }
          let mesh = createPolygon(shape, arr, province); 
          provinceObj.add(mesh); 
        });
      });
    }
    chinaObj.add(provinceObj); 
  });
}

function createPolygon(shape, arr, province) {
  let extrudeMats = {
    steps: 20,
    depth: 0.2,
    bevelEnabled: false,
    bevelThickness: 1,
    bevelSize: 1,
    bevelOffset: 0,
    bevelSegments: 1
  }
  let geo = new THREE.ExtrudeGeometry(shape);
  let mesh = new THREE.Mesh(geo, extrudeMats);
  if (province.properties.name) {
    mesh.name = province.properties.name; 
  }
  // 其他代码...
  return mesh;
}